#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <assert.h> 
#include <string.h>
#include <windows.h>


static int JudgeLeft(const char * s1, const char * find)
{
	assert(s1);
	assert(find);
	char str[64];
	strcpy(str, s1);
	strcat(str, s1);
	if (strstr(str, find) != NULL){
		return 1;
	}
	return 0;
}

int main()
{
	char *string = "AABCD";
	char *find = "BCDAA";
	printf("%d\n", JudgeLeft(string, find));
	system("pause");
	return 0;
}